import java.net.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.io.*;
 
public class KKmultiServer {
	public static Map<String,nodoservidor> servidores = new HashMap<String,nodoservidor>() ;
	public static Map<String,nodocliente> clientes = new  HashMap<String,nodocliente>() ;
	public static Map<String,String> hablacliente = new  HashMap<String,String>() ;
	public static Map<String, ArrayList<String>> hablaservidor = new  HashMap<String, ArrayList<String>>() ;
	
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket = null;
        boolean listening = true;
     
        try {
            serverSocket = new ServerSocket(4444);
            System.err.println("arranco el server");
        } catch (IOException e) {
            System.err.println("Could not listen on port: 4444.");
            System.exit(-1);
        }
 
        while (listening)
        new nodo(serverSocket.accept()).start();
 
        serverSocket.close();
    }
}